<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<script type="text/javascript" src="static/js/jquery.js"></script>
<script type="text/javascript">

	function getObj(id){
		return document.getElementById(id);
	}

	function getContact(id){
		
		window.location.href = "rest/contacts/"+getObj(id).value;
	}

	function getAllContact(type){
		if("json" == type){
			$.getJSON("rest/contacts",null,function(response){
				for(var k in response){
					alert(k+" "+response[k]);
				}
			});
			
		}
	}
</script>
<a href="static/html/new_contact.html">Add New Contact</a><br>
<a href="rest/contacts">List All Contact</a><br>
<a href="#" onclick="getAllContact('json')">List All Contact Json</a><br>
<a href="rest/contacts/count">Get Contact Count</a><br>
<a href="#" onclick="getContact('contactId')">Get one Count</a><input id="contactId" name="contactId" type="text"></input><br>

<div id="resultDiv"></div>
</body>
</html>